#include <iostream>
#include "happy.h"

namespace wml {

int add(int a, int b) {
    return a + b;
}

Person::Person(const std::string &&name, u_int8_t age): _name(name), _age(age) {}

Person::~Person() {
    std::cout << "release Person !" << std::endl;
}

void Person::run() {
    std::cout << "name: " << _name << " age: "<<  _age << " run !" << std::endl;
}


ProfileClient& ProfileClient::GetInstance()
{
    static ProfileClient instance;
    return instance;
}

void ProfileClient::LogInfo()
{
    std::cout << "LogInfo..." << std::endl; 
}

ProfileClient * GetProfileClientInstance() {
    return std::addressof( ProfileClient::GetInstance() );
}

Person * createPerson(const std::string name, u_int8_t age) {
    return new Person(std::move(name), age);
}

void releasePerson(Person * p) {
    delete p;
}


}
